package es.pawer.web.checklists.data;

import java.io.Serializable;
import java.util.List;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Order;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Checklist implements Serializable{

	private static final long serialVersionUID = 3071262398496852520L;
	
	@Persistent
	private String name;
	
	@PrimaryKey
	@Persistent
    private Long id;

	@Persistent(mappedBy="list")
	@Order(extensions = @Extension(vendorName="datanucleus", key="list-ordering", value="value asc"))
	private List<ListItem> items;
    
	public List<ListItem> getItems() {
		return items;
	}
	public void setItems(List<ListItem> items) {
		this.items = items;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
    
}
